package design.patterns.factorymode.factoryabstract.computer1;

/**
 * desc     :
 * dateTime : 2020/7/21 9:09
 *
 * @author cww
 */

public class MacComputer extends AbstractComputerFactory{
    private static class MacSingle {
        public MacSingle() {
            System.out.println("MacSingle");
        }

        private static MacComputer macComputer = new MacComputer();
    }

    public MacComputer() {
        System.out.println("ss");
    }

    public static MacComputer getInstance(){
        return MacSingle.macComputer;
    }

    public Cpu getCpu() {
        return new MacCpu();
    }
    public Ram getRam() {
        return new MacRam();
    }
}
